package com.zzw.springboot.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 系统日志实体类
 */
@ApiModel("系统日志")
@TableName("sys_log")
@Data
public class SysLog {
    
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("日志ID")
    private Long id;
    
    /**
     * 操作用户ID
     */
    @ApiModelProperty("操作用户ID")
    private Integer userId;
    
    /**
     * 操作用户名
     */
    @ApiModelProperty("操作用户名")
    private String username;
    
    /**
     * 操作模块
     */
    @ApiModelProperty("操作模块")
    private String module;
    
    /**
     * 操作类型
     */
    @ApiModelProperty("操作类型")
    private String type;
    
    /**
     * 操作描述
     */
    @ApiModelProperty("操作描述")
    private String description;
    
    /**
     * 请求方法
     */
    @ApiModelProperty("请求方法")
    private String method;
    
    /**
     * 请求地址
     */
    @ApiModelProperty("请求地址")
    private String url;
    
    /**
     * 请求参数
     */
    @ApiModelProperty("请求参数")
    private String params;
    
    /**
     * 请求IP
     */
    @ApiModelProperty("请求IP")
    private String ip;
    
    /**
     * 操作状态（0失败，1成功）
     */
    @ApiModelProperty("操作状态（0失败，1成功）")
    private Integer status;
    
    /**
     * 错误信息
     */
    @ApiModelProperty("错误信息")
    private String errorMsg;
    
    /**
     * 操作结果
     */
    @ApiModelProperty("操作结果")
    private String result;
    
    /**
     * 执行时间(ms)
     */
    @ApiModelProperty("执行时间(ms)")
    private Long costTime;
    
    /**
     * 操作时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("操作时间")
    private Date createTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public Long getCostTime() {
        return costTime;
    }

    public void setCostTime(Long costTime) {
        this.costTime = costTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
} 